<!--
 * @Description: 信息报送详情
 * @Author: Lihuanyu
 * @Date: 2021-09-15 16:22:15
 * @LastEditors: Lihuanyu
 * @LastEditTime: 2021-09-15 18:01:48
-->

<template>
  <view class="content">
    <view class="report-content">
      <view class="form-item">
        <view class="title">信息标题</view>
        <view class="form-content">
          深圳市南山区发生严重洪涝灾，请安排人员紧急处理
        </view>
      </view>
      <view class="form-item">
        <view class="title">事件类型</view>
        <view class="form-content">
          <view>洪涝</view>
          <view class="scope">影响范围
            <text class="unit color-blue">15km</text></view>
        </view>
      </view>
      <view class="form-item">
        <view class="title">事发地址</view>
        <view class="form-content"> 深圳市南山区红老街 </view>
      </view>
      <view class="form-item">
        <view class="title">信息描述</view>
        <view class="form-content">
          此处是信息描述内容，深圳市南山区发生严重洪涝灾，请安排人员紧急处理。此处是信息描述内容，此处是信息描述内容，此处是信息描述内容，此处是信息描述内容，此处是信息描述内容，此处是信息描述内容，此处是信息描述内容。
        </view>
      </view>
      
      <view class="img-list">
        <view class="title">现场照片</view>
        <view class="item" v-for="(item, index) in imgList" :key="index">
          <image
            class="img"
            mode="aspectFill"
            :src="item.src"
            @click="lookImg(index)"
          ></image>
        </view>
      </view>
      
      <view class="video-list">
        <view class="title">现场视频</view>
        <view class="item" v-for="(item, index) in videoList" :key="index">
          <video class="video" :src="item.src"></video>
        </view>
      </view>
    </view>

    <view class="report-content">
      <view class="form-item">
        <view class="title">报送时间</view>
        <view class="form-content">
          2021/11/11 12:12:12
        </view>
      </view>
      <view class="form-item">
        <view class="title">报送人</view>
        <view class="form-content">
          张小飞（观澜河水文观测站）
        </view>
      </view>
      <view class="form-item">
        <view class="title">联系方式</view>
        <view class="form-content">
          139299239322
        </view>
      </view>
    </view>
    
    <view class="report-content">
      <view class="form-item">
        <view class="title">处理状态</view>
        <view class="form-content color-blue">
          未处理
        </view>
      </view>
      <view class="form-item">
        <view class="title">处理意见</view>
        <view class="form-content">
          重复信息
        </view>
      </view>
      <view class="form-item">
        <view class="title">处理人</view>
        <view class="form-content">
          李小小
        </view>
      </view>
      <view class="form-item">
        <view class="title">处理时间</view>
        <view class="form-content">
          2021/11/11 13:12:12
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      array: ["类型1", "类型2", "类型3", "类型4"],
      parmsArray: ["否", "是"],
      imgList: [
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
        },
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
        },
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
        },
      ],
      videoList: [
        { src: "https://www.runoob.com/try/demo_source/movie.mp4" },
        { src: "https://www.runoob.com/try/demo_source/movie.mp4" },
      ],
      index: 0,
    };
  },
  methods: {
    // 查看图片
    lookImg: function (val) {
      let imgs = this.imgList.map((item) => {
        return item.src;
      });
      uni.previewImage({
        urls: imgs,
        current: val,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
* {
  box-sizing: border-box;
}
.content {
  width: 100%;
  background: #f9f9f9;
  padding: 40rpx 32rpx;
}

.color-blue{
  color: #027AFF;
}

.color-red{
  color: #FF5151;
}

.color-gray{
  color: #00D694;
}

.report-content {
  width: 100%;
  height: auto;
  background-color: #fff;
  padding: 0 32rpx;
  border-radius: 16rpx;
  background: #fff;
  box-shadow: 0px 5rpx 5rpx rgba(2, 122, 255, 0.2);
  margin-bottom: 32rpx;
}

.form-item {
  min-height: 96rpx;
  line-height: 46rpx;
  padding: 25rpx 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2rpx solid #f9f9f9;
  font-size: 28rpx;
  .title {
    width: 180rpx;
    color: #2b2b2b;
  }
  .form-content {
    width: calc(100% - 190rpx);
  }
  &:last-child{
    border-bottom: none;
  }
}

::v-deep .uni-input-wrapper,
::v-deep .uni-textarea-wrapper {
  font-size: 28rpx;
}

.scope{
  margin-top: 20rpx;
  .unit{
    font-size: 28rpx;
    margin-left: 10rpx;
  }
}

.img-list,
.video-list {
  background-color: #fff;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 24rpx 0;
  border-bottom: 1px solid #f9f9f9;
  .title{
    width: 100%;
    font-size: 28rpx;
    margin-bottom: 20rpx;
    height: 28rpx;
    line-height: 28rpx;
  }
  .item {
    width: 24%;
    height: 160rpx;
    border-radius: 8rpx;
    margin: 1% 0.5%;
    position: relative;
    .img,
    .video {
      width: 100%;
      height: 100%;
    }
    .icon-guanbi {
      position: absolute;
      right: 4rpx;
      top: 4rpx;
      z-index: 100;
      font-size: 32rpx;
      color: rgba($color: #fff, $alpha: 0.9);
    }
  }
}
</style>
